import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/Login'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '房态中心' }
                },
                {
                    path: '/admin',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/Admin.vue'),
                    meta: { title: '用户设置' }
                },
      
                {
                    path: '/table',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/BaseTable.vue'),
                    meta: { title: '预定接待' }
                },
                {
                    path: '/tabs',
                    component: () => import(/* webpackChunkName: "tabs" */ '../components/page/Tabs.vue'),
                    meta: { title: '资料设置' }
                },
                {
                    path: '/form',
                    component: () => import(/* webpackChunkName: "form" */ '../components/page/BaseForm.vue'),
                    meta: { title: '业主托管' }
                },
				{
				    //
				    path: '/upload',
				    component: () => import(/* webpackChunkName: "upload" */ '../components/page/Upload.vue'),
				    meta: { title: '业主设置' }
				},
				{
				    // 
				    path: '/drag',
				    component: () => import(/* webpackChunkName: "drag" */ '../components/page/DragList.vue'),
				    meta: { title: '报表中心' }
				},
				{
				    // 拖拽Dialog组件
				    path: '/dialog',
				    component: () => import(/* webpackChunkName: "dragdialog" */ '../components/page/DragDialog.vue'),
				    meta: { title: '操作日志' }
				},
				{
				    //
				    path: '/dianziqianming',
				    component: () => import(/* webpackChunkName: "dragdialog" */ '../components/page/电子签名.vue'),
				    meta: { title: '电子签名' }
				},
				{
				    // 
				    path: '/pingzhengliebiao',
				    component: () => import(/* webpackChunkName: "dragdialog" */ '../components/page/凭证列表.vue'),
				    meta: { title: '凭证列表' }
				},
				{
				    path: '/icon',
				    component: () => import(/* webpackChunkName: "icon" */ '../components/page/Icon.vue'),
				    meta: { title: '会员中心' }
				},
               
                {
                    // vue-schart组件
                    path: '/charts',
                    component: () => import(/* webpackChunkName: "chart" */ '../components/page/BaseCharts.vue'),
                    meta: { title: '合约单位' }
                },
                
                {
                    // 国际化组件
                    path: '/i18n',
                    component: () => import(/* webpackChunkName: "i18n" */ '../components/page/I18n.vue'),
                    meta: { title: '营销管理' }
                },
                {
                    // 权限页面
                    path: '/permission',
                    component: () => import(/* webpackChunkName: "permission" */ '../components/page/Permission.vue'),
                    meta: { title: '权限测试', permission: true }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
                {
                    path: '/donate',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Donate.vue'),
                    meta: { title: '支持作者' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
